Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

has-dynamic-import

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

has-dynamic-import

Does the current environment have `import()` support?

  • 2.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

has-dynamic-import Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Does the current environment have import() support?

At the time of this writing, node v12.17+, v13.2+ and v14.0+ has support for dynamic import(); the syntax is supported in node v10+.

The former can be checked in the package‘s main export, which is an async function that returns a boolean indicating if the current environment fully supports dynamic import. Note that in node v12.17 - v12.19 and v13.4 - v13.13, an ExperimentalWarning will be logged.

The latter can be checked with 'has-dynamic-import/syntax', which is a function that returns a boolean indicating if the current environment supports parsing the syntax of dynamic import.

Tests

Simply clone the repo, npm install, and run npm test

Keywords

FAQs

Package last updated on 13 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc